package com.shfl.servermanage.logic.mapper;

import com.shfl.servermanage.logic.bean.SysAttachment;
import com.shfl.servermanage.logic.model.info.AddSingleAttachmentInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface SysAttachmentMapper {
    int deleteByPrimaryKey(Long id);

    int insert(SysAttachment record);

    int insertSelective(SysAttachment record);

    SysAttachment selectByPrimaryKey(Long id);

    SysAttachment selectByPrimaryKeyWithLogicalDelete(@Param("id") Long id, @Param("andLogicalDeleted") boolean andLogicalDeleted);

    int updateByPrimaryKeySelective(SysAttachment record);

    int updateByPrimaryKey(SysAttachment record);

    int batchInsert(@Param("list") java.util.List<SysAttachment> list);

    int batchInsertSelective(@Param("list") java.util.List<SysAttachment> list, @Param("selective") SysAttachment.Column... selective);

    int logicalDeleteByPrimaryKey(Long id);

    void removeByRelationIdAndAttachType(@Param("relationId")Long relationId
            ,@Param("attachType") String attachType);

    void enableSingle(AddSingleAttachmentInfo info);

    List<SysAttachment> findByMap(Map<String, Object> objectMap);
}